<template>
    <div class="note-page">
        <div class="total">
            {{ noteTotal }} 条笔记
        </div>
        <div class="notes">
            <ul>
                <li v-for="item of noteList" :key="item.id">
                    <div class="head flex item-center">
                        <img :src="item.userAvatar" height="50px" width="50px" alt="">
                        <div class="username">{{ item.user_name }}</div>
                        <div class="date small">{{ item.create_time }}</div>
                    </div>
                    <div class="content" v-html="item.content"></div>
                </li>
            </ul>
        </div>
    </div>
    </template>
    
    <script>
    export default {
        props: {
            noteTotal: {
                type: Number,
                default: 0
            },
            noteList: {
                type: Array,
                default: () => {
                    return []
                }
            }
        }
    }
    </script>
    
    <style lang="scss" scoped>
    .note-page {
        padding: 20px;
        .total {
            padding: 20px 0;
        }
        .notes {
            li {
                padding: 10px;
                margin-bottom: 15px;
                border-bottom: 1px solid #eee;
                .head {
                    img {
                        border-radius: 10px;
                    }
                    img, .username {
                        margin-right: 20px;
                    }
                    .date {
    
                    }
                }
                .content {
                    margin-top: 20px;
                    padding-left: 60px;
                    word-break:break-all;
                    word-wrap:break-word

                }
            }
            
        }
    }
    </style>